import React, { PureComponent,createRef } from 'react';
import Dihua from './dihua'
class index extends PureComponent {
    constructor(props){
        super(props);
        this.dihuaRef = createRef()
    }
    render() {
        return (
            <div>
                AAAAAAAAAAAAA
                <button onClick={e=>{this.handleClick()}}>一个按钮</button>
                <Dihua ref={this.bindRef} ></Dihua>
            </div>
        );
    }
    bindRef = ref => { this.dihuaRef = ref }
    handleClick(){
        this.dihuaRef.sonFn()
    }
}

export default index;